package pub.guoxin.oops.common.auth.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * Created by guoxin on 17-11-16.
 */
public class BCryptPasswordEncoderUtils {

    private static final BCryptPasswordEncoder B_CRYPT_PASSWORD_ENCODER = new BCryptPasswordEncoder();
    /**
     * 加密密码
     */
    public static String encryptPassword(String password){
        return B_CRYPT_PASSWORD_ENCODER.encode(password);
    }

    public static void main(String[] args) {
        String s = encryptPassword("123456");
        System.out.println(s);
    }
}
